package com.ctgu.tengyun.domain;

import com.ctgu.tengyun.bean.FileBean;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;
import java.util.Date;

public class ProductRepairRecord implements Serializable {
    /**
     * 主键id
     */
    private Long id;

    /**
     * 产品型号
     */
    private String productNo;

    /**
     * 检修日期
     */
    private Date repairDate;

    /**
     * 检修类型，1-日检修，2-周检修，3-月检修
     */
    private Integer repairType;

    /**
     * 检修表
     */
    private FileBean repairFile;

    /**
     * 维修人员
     */
    private String repairPerson;

    /**
     * 记录员
     */
    private String recordPerson;

    /**
     * 是否故障,0-否，1-是
     */
    private Integer isTrouble;

    /**
     * 备注
     */
    private String remark;

    /**
     * 是否有效,0-无效，1-有效
     */
    private Integer isValid;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 最后更新时间
     */
    private Date lastModifyTime;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getProductNo() {
        return productNo;
    }

    public void setProductNo(String productNo) {
        this.productNo = productNo;
    }

    public Date getRepairDate() {
        return repairDate;
    }

    public void setRepairDate(Date repairDate) {
        this.repairDate = repairDate;
    }

    public Integer getRepairType() {
        return repairType;
    }

    public void setRepairType(Integer repairType) {
        this.repairType = repairType;
    }

    public FileBean getRepairFile() {
        return repairFile;
    }

    public void setRepairFile(FileBean repairFile) {
        this.repairFile = repairFile;
    }

    public String getRepairPerson() {
        return repairPerson;
    }

    public void setRepairPerson(String repairPerson) {
        this.repairPerson = repairPerson;
    }

    public String getRecordPerson() {
        return recordPerson;
    }

    public void setRecordPerson(String recordPerson) {
        this.recordPerson = recordPerson;
    }

    public Integer getIsTrouble() {
        return isTrouble;
    }

    public void setIsTrouble(Integer isTrouble) {
        this.isTrouble = isTrouble;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getIsValid() {
        return isValid;
    }

    public void setIsValid(Integer isValid) {
        this.isValid = isValid;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getLastModifyTime() {
        return lastModifyTime;
    }

    public void setLastModifyTime(Date lastModifyTime) {
        this.lastModifyTime = lastModifyTime;
    }

//    @JsonProperty(value = "repairDateTime")
//    public Long getReapirDateTime(){
//        return repairDate.getTime();
//    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", productNo=").append(productNo);
        sb.append(", repairDate=").append(repairDate);
        sb.append(", repairType=").append(repairType);
        sb.append(", repairFile=").append(repairFile);
        sb.append(", repairPerson=").append(repairPerson);
        sb.append(", recordPerson=").append(recordPerson);
        sb.append(", isTrouble=").append(isTrouble);
        sb.append(", remark=").append(remark);
        sb.append(", isValid=").append(isValid);
        sb.append(", createTime=").append(createTime);
        sb.append(", lastModifyTime=").append(lastModifyTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}